public class Vector2 
{
	float x, y;
	public Vector2(float x, float y)
	{
		this.x = x;
		this.y = y;
	}
	
	public Vector2()
	{
		x = 0f;
		y = 0f;
	}
	
	public float GetMagnitude()
	{
		return (float)Math.sqrt(x*x + y*y);
	}
	
	public void Normalize()
	{
		float magnitude = (float)Math.sqrt(x*x + y*y);
		x /= magnitude;
		y /= magnitude;
	}
	
	public static Vector2 Add(Vector2 v1, Vector2 v2)
	{
		return new Vector2(v1.x + v2.x, v1.y + v2.y);
	}
	
	public void Add(Vector2 v)
	{
		x += v.x;
		y += v.y;
	}
	
	public static Vector2 Minus(Vector2 v1, Vector2 v2)
	{
		return new Vector2(v1.x - v2.x, v1.y - v2.y);
	}
	
	public void Minus(Vector2 v)
	{
		x -= v.x;
		y -= v.y;
	}
	
	public static Vector2 Multiply(Vector2 v1, float a)
	{
		return new Vector2(v1.x * a, v1.y * a);
	}
	
	public void Multiply(float a)
	{
		x *= a;
		y *= a;
	}
}
